<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>组件</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
<div id="app">

    {{msg}}

    <input type="text" v-model="msg">


    <javaboy v-bind:name='msg'></javaboy>
    <!--<javaboy name='msg'></javaboy>-->

</div>


</body>


<script>
    Vue.component('javaboy',{
        props:['name'],
        template:"<h2>{{name}}</h2>"
    });
    var app = new Vue({
        el: '#app',
        data: {
            msg: 'hhh',
            title:"coollll"


        }
    })

</script>
</html>
